package com.define.ssh.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/****
 * 监控对象
 * @author sc
 *
 */
@Entity
@Table(name = "m_warn_target")
public class MWarnTarget implements java.io.Serializable {

	// Fields

	private Long id;
	private Integer targetid;//监控对象编码
	private Integer netid; //网元编号
	private String pname; //网元名称
	private String ip;    //所在服务器IP地址
	private Integer stype; //范围编号
	private String sname;  //监控范围名称
	private String sdetail;//监控范围明细
	private Integer warnthreshold;//告警阀值
	private Integer warnlevel;//告警级别
	private Integer updatetype;//更新标示 1新增 2修改 3删除
	private Date updatetime;  //更新时间
	private Integer tenable;//状态  0 启用 1 禁用

	// Constructors

	/** default constructor */
	public MWarnTarget() {
	}

	
	@GeneratedValue(generator="generator")
	@Id
	@GenericGenerator(name = "generator", strategy = "identity") 
	@Column(name = "id", unique = true, nullable = false, precision = 20, scale = 0)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	@Column(name = "targetid", unique = true, nullable = false, insertable = true, updatable = true)
	public Integer getTargetid() {
		return this.targetid;
	}

	public void setTargetid(Integer targetid) {
		this.targetid = targetid;
	}

	@Column(name = "netid", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getNetid() {
		return this.netid;
	}

	public void setNetid(Integer netid) {
		this.netid = netid;
	}

	@Column(name = "pname", unique = false, nullable = false, insertable = true, updatable = true, length = 60)
	public String getPname() {
		return this.pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	@Column(name = "ip", unique = false, nullable = false, insertable = true, updatable = true, length = 20)
	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	@Column(name = "stype", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getStype() {
		return this.stype;
	}

	public void setStype(Integer stype) {
		this.stype = stype;
	}

	@Column(name = "sname", unique = false, nullable = false, insertable = true, updatable = true, length = 60)
	public String getSname() {
		return this.sname;
	}

	public void setSname(String sname) {
		this.sname = sname;
	}

	@Column(name = "sdetail", unique = false, nullable = false, insertable = true, updatable = true, length = 60)
	public String getSdetail() {
		return this.sdetail;
	}

	public void setSdetail(String sdetail) {
		this.sdetail = sdetail;
	}

	@Column(name = "warnthreshold", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getWarnthreshold() {
		return this.warnthreshold;
	}

	public void setWarnthreshold(Integer warnthreshold) {
		this.warnthreshold = warnthreshold;
	}

	@Column(name = "warnlevel", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getWarnlevel() {
		return this.warnlevel;
	}

	public void setWarnlevel(Integer warnlevel) {
		this.warnlevel = warnlevel;
	}

	@Column(name = "updatetype", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getUpdatetype() {
		return this.updatetype;
	}

	public void setUpdatetype(Integer updatetype) {
		this.updatetype = updatetype;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updatetime", unique = false, nullable = false, insertable = true, updatable = true, length = 19)
	public Date getUpdatetime() {
		return this.updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	@Column(name = "tenable")
	public Integer getTenable() {
		return tenable;
	}

	public void setTenable(Integer tenable) {
		this.tenable = tenable;
	}
	
	
	

}